package com.dynamic.datasource.dao.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2022-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("person")
public class Person extends Model<Person> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Integer id;

    @TableField("name")
    private String name;

    @TableField("age")
    private Integer age;

    @TableField("address")
    private String address;

    @TableField("sex")
    private String sex;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
